package com.itheima.message.listener;

import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "%DLQ%stock-group13",consumerGroup = "dlq_message_group",selectorExpression = "stock")
public class DLQListener implements RocketMQListener<Message> {

    @Override
    public void onMessage(Message message) {

        System.out.println("receive dlq message : "+new String(message.getBody()));

    }
}
